package com.taotao.remote;

import com.taotao.common.core.domain.Result;
import com.taotao.product.domain.SkuInventoryQuantity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "taotao-product")
public interface SkuInfoRemoteService {

    /**
     * @Author ZhangYuQi
     * @Description 根据skuIds查询对应的商户id
     * @Date 下午10:08 2024/12/27
     * @Param [skuIds]
     * @return
     */
    @GetMapping("/skuinfo/selectMerchantIdsBySkuIds/{skuId}")
    public Result<Long> selectMerchantIdsBySkuIds(@PathVariable("skuId") Long skuId);


    /**
     * @Author ZhangYuQi
     * @Description 批量同步商品库存
     * @Date 上午12:48 2025/2/10
     * @Param [skuIds]
     * @return
     */
    @PostMapping("/skuinfo/decrInventory")
    public Result decrInventory(@RequestBody List<SkuInventoryQuantity> skuInventoryQuantities);
}
